package vip.mtdp.usercenter.service;


import vip.mtdp.common.exception.AppRTException;
import vip.mtdp.usercenter.dto.UserDTO;

import java.util.List;

/**
 * 
 *
 * @Description 用户服务
 * @author wangguoqing
 * @date 2017年9月17日下午1:20:18
 *
 */
public interface UserRpcService {

	/**
	 * 创建一个用户(帐号),partyId,personId/merchantId,登录名及密码必填
	 * @param userDTO
	 * @return
	 * @throws AppRTException
	 */
	public UserDTO createUser(UserDTO userDTO) throws AppRTException;

	/**
	 * 更新用户信息
	 * @param userDTO
	 * @return
	 * @throws AppRTException
	 */
	public UserDTO updateUser(UserDTO userDTO) throws AppRTException;

	/**
	 * 修改用户密码
	 * @param userDTO
	 * @return
	 * @throws AppRTException
	 */
	public boolean modifyUserPwd(UserDTO userDTO) throws AppRTException;

	/**
	 * 登录
	 * @param userName
	 * @param pwd
	 * @return
	 * @throws AppRTException
	 */
	public UserDTO login(String userName, String pwd) throws AppRTException;

	/**
	 * 根据客户id查询出所有用户,包括所属客户/商户
	 * @param partyId
	 * @return
	 * @throws AppRTException
	 */
	public List<UserDTO> getUserByPartyId(Long partyId) throws AppRTException;

	/**
	 * 根据用户id查询用户信息
	 * @param userId
	 * @return
	 * @throws AppRTException
	 */
	public UserDTO getUserByUserId(Long userId) throws AppRTException;

}
